﻿<div class="col-lg-8" style="padding-left: 0">
    <table class="table table-hover table-bordered">
        <thead>
            <tr>
                <th class="col-sm-2">做菜步骤序号</th>
                <th>描述</th>
                <th class="col-sm-2"><button ng-click="eventAdd()" class="btn btn-primary btn-xs">添加事件</button></th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="item in events">
                <td ng-if="!item.isModified">{{item.EventTime}}</td>
                <td ng-if="item.isModified"><input type="text" class="form-control" ng-model="item.EventTime" /></td>
                <td ng-if="item.isModified">
                    <input type="text" class="form-control" ng-model="item.Message" />
                </td>
                <td ng-if="!item.isModified">{{item.Message}}</td>
                <td ng-if="!item.isModified">
                    <button type="button" ng-click="eventRemove(item)" class="btn btn-danger btn-xs">删除</button>
                    <button type="button" ng-click="eventEdit(item.Id)" class="btn btn-success btn-xs">编辑</button>
                </td>
                <td ng-if="item.isModified">
                    <button type="button" ng-click="eventCancel(item)" class="btn btn-danger btn-xs">取消</button>
                    <button type="button" ng-click="eventSave(item)" class="btn btn-success btn-xs">保存</button>
                </td>
            </tr>
        </tbody>
    </table>
</div>
